<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" class="cname">
    <input type="text" class="skin_name">
    <button>添加</button>
    <script src="lib/jquery.3.6.0.js"></script>
    <script>
        $(function(){
            $("button").click(function(){
                const cname=$('.cname').val()
                const skin_name=$('.skin_name').val()
                $.ajax({
                    url:'http://127.0.0.1:3001/addHeroSkin',
                    type:'post',
                    data:{cname,skin_name},
                    success(res){
                        console.log(res);
                    }
                })
            })
        })
    </script>
</body>
</html>